package de.islanders.gameobject;

import de.islanders.interfaces.Collectable;
import de.islanders.interfaces.Mineable;
import de.islanders.unit.player.Player;
import de.islanders.world.Position;

public class Material extends GameObject implements Collectable, Mineable {
	
	private int type;

	public Material(String name, double weight, double scaling, Position position, int type) {
		super(name, weight, scaling, position);
		this.type = type;
	}

	/**
	 * @return the type
	 */
	public int getType() {
		return type;
	}



	/**
	 * @param type the type to set
	 */
	public void setType(int type) {
		this.type = type;
	}



	public void onUse(Player player) {
		player.mine(this);
	}

	@Override
	public String onExamine() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void onDelete(Player player) {
		player.getInventory().getItems().remove(this);
		
	}

}
